package com.mmd.common.enums;

public enum StatusEnums {
    AUFIT_FAIL(0, "审核失败"),
    SAVE(1, "草稿"),
    WAITAUDIT(2, "待审核"),
    AUDIT(3, "已审核"),
    PAYMENT(4, "已付款"),
    WAREHOUSING(5, "货物入仓"),
    DELIVERED(6, "出货"),
    SIGN(7, "已签收");

    private StatusEnums(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public static StatusEnums getStatusEnum(Integer code) {
        StatusEnums[] enumArr = StatusEnums.values();
        for (StatusEnums e : enumArr) {
            if (code.equals(e.getCode())) {
                return e;
            }
        }
        return null;
    }

    private Integer code;
    private String name;

    public Integer getCode() {
        return code;
    }

    public String getName() {
        return name;
    }
}
